
<html>
<base href="<?php echo base_url();?>">
<head>
<style type="text/css">
a{text-decoration:none;color:blue;}
a:hover{color:red;}
</style>
<link rel="stylesheet" href="<?php echo base_url();?>css/admin/base.css" type="text/css">
<?php if(!empty($error)){?>
 <script type="text/javascript">
  
        alert("非法错误: "+"<?php echo $error;?>");   

 </script>
 <?php }?>
</head>

<body>

<table border="1" width="90%">

<caption style="height:30px;line-height:30px;"><font color="#AE39B"><b style="font-size:16px;">文章列表</b></font></caption>	
<tbody><tr>
    <tr align="center">
    <th width="35%"><font color=red><span style="font-size:15px"> 标题</span></font></th>
    <th width="20%"><font color=blue><span style="font-size:15px">添加时间</span></font></th>
    <th width="15%"><font color=blue><span style="font-size:15px">置顶</span></font></th>
    <th width="15%"><font color=blue><span style="font-size:15px">操作</span></font></th>
	<th width="15%"><font color=blue><span style="font-size:15px">评论</span></font></th>
    </tr> 
<?php 
 foreach($articlelist as $v){
?>
<tr align="center">
  <th width="35%"><a href="<?php echo site_url('admin/editarticle/'.$v['id']);?>"><font color=red> <span style="font-size:15px"><?php echo $v['title'];?></span></font></a></th>
  <th width="20%"> <span style="font-size:15px"><?php echo  $v['time'];?></span></th>
  <th width="15%">
          <?php 
		     $settop=$v['settop'];
			 if($settop>0){
		  ?>
		  <a href="<?php echo site_url('admin/cancelsettop/'.$v['id']."/".$v['cid']);?>"><font color="red"><span style="font-size:15px;">取消置顶</span></font></a>
		 
			 <?php }else{?>
		  <a href="<?php echo site_url('admin/settop/'.$v['id']."/".$v['cid']);?>"><span style="font-size:15px">设为置顶</span></font></a>
			 <?php }?>
  </th>
  <th width="15%"><font color=blue>[<a href="<?php echo site_url('admin/delarticle/'.$v['id']."/".$v['cid']);?>"><span style="font-size:15px">删除</span></a>]</font></th>
  <th width="15%"><font color=blue>[<a href="<?php echo site_url('admin/commentlist/'.$v['id']);?>"><span style="font-size:15px">管理评论</span></a>]</font></th>
  
</tr>
<?php
  }
?>
</tr>

</table>
<div style="float:right;margin-right:10%"><?php echo $this->pagination->create_links();?></div>
<body>
<a href="<?php echo site_url('admin/addarticle/'.$cid);?>"><span style="font-size:15px">添加文章</span></a>

</html>






